#include <bits/stdc++.h>
using namespace std;
int gs[100005];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    int gjcs=n,gss=n;
    for(int i=1;i<=n;i++){
        cin>>gs[i];
    }
    sort(gs+1,gs+n+1);
    for(int i=n;i>=1;i--){
            if(gs[i]==-1){
                break;
            }
    for(int j=1;j<i;j++){
        if(gs[i]>gs[j]&&gs[j]!=-1){
            gss-=1;
            gs[j]=-1;
            gjcs-=2;
 //           cout<<gss<<" "<<gjcs<<endl;
            break;
        }
    }
    }
            if(gjcs<=1)
            cout<<gss-gjcs;
            else
                cout<<gss;
            return 0;
}
